using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;

namespace WebPrinter.Library.DaQu.Params
{
    /// <summary>
    /// 打印请求参数
    /// </summary>
    public class PrintParam : SnParam
    {
        /// <summary>
        /// 打印小票模板内容
        /// </summary>
        [StringLength(6000)]
        [JsonProperty("content")]
        public string Content { get; set; }

        /// <summary>
        /// 播报音源
        /// </summary>
        [StringLength(120)]
        [JsonProperty("voice")]
        public string Voice { get; set; }

        /// <summary>
        /// 播报语音次数，默认1，最大5
        /// </summary>
        [Range(1, 5)]
        [JsonProperty("voicePlayTimes")]
        public int? VoicePlayTimes { get; set; }

        /// <summary>
        /// 多次播报语音时的间隔秒数，默认3秒
        /// </summary>
        [JsonProperty("voicePlayInterval")]
        public string VoicePlayInterval { get; set; }

        /// <summary>
        /// 打印小票张数，默认1，范围1~5
        /// </summary>
        [Range(1, 5)]
        [JsonProperty("copies")]
        public int? Copies { get; set; }

        /// <summary>
        /// 希望在多少秒后过期（120 <= s <= 86400），默认两小时
        /// </summary>
        [Range(120, 86400)]
        [JsonProperty("expiresInSeconds")]
        public int? ExpiresInSeconds { get; set; }
    }
}